﻿using CommunityToolkit.Mvvm.ComponentModel;
using MeasureAbstract.IMotionDevice;
using MeasureAbstract.ISignalGenerator;
using MeasureAbstract.IVectorNetworkAnalyzer;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace 紧缩场反射面装调测试系统
{
    public partial class SystemConfig : ObservableObject
    {
        [JsonProperty(PropertyName = "起始页面")]
        public string StartPage { get { return _StartPage; } set { SetProperty(ref _StartPage, value); } }
        [JsonIgnore]
        private string _StartPage = "仪器设置";

        [JsonProperty(PropertyName = "起始窗口大小")]
        public string StartWindowSize { get { return _StartWindowSize; } set { SetProperty(ref _StartWindowSize, value); } }
        [JsonIgnore]
        private string _StartWindowSize = "常规";

        [JsonProperty(PropertyName = "测试设备组成")]
        public string Structure { get { return _Structure; } set { SetProperty(ref _Structure, value); } }
        [JsonIgnore]
        private string _Structure = "转台、矢网";

        [JsonProperty(PropertyName = "数据小数位数")]
        public int DecimalPlaces { get { return _DecimalPlaces; } set { SetProperty(ref _DecimalPlaces, value); } }
        [JsonIgnore]
        private int _DecimalPlaces = 3;

        [JsonProperty(PropertyName = "数据保存目录")]
        public string DataDirectory { get { return _DataDirectory; } set { SetProperty(ref _DataDirectory, value); } }
        [JsonIgnore]
        private string _DataDirectory = "D:\\";

        [JsonProperty(PropertyName = "默认文件格式")]
        public string DefaultFileFormat { get { return _DefaultFileFormat; } set { SetProperty(ref _DefaultFileFormat, value); } }
        [JsonIgnore]
        private string _DefaultFileFormat = "txt";

        [JsonProperty(PropertyName = "选择的运动设备")]
        public string SelectedMotionDevice { get { return _SelectedMotionDevice; } set { SetProperty(ref _SelectedMotionDevice, value); } }
        [JsonIgnore]
        private string _SelectedMotionDevice = "";

        [JsonProperty(PropertyName = "运动设备配置")]
        public MotionDeviceConfig MotionDeviceConfig { get; set; }

        [JsonProperty(PropertyName = "选择的矢量网络分析仪")]
        public string SelectedVectorNetworkAnalyzer { get { return _SelectedVectorNetworkAnalyzer; } set { SetProperty(ref _SelectedVectorNetworkAnalyzer, value); } }
        [JsonIgnore]
        private string _SelectedVectorNetworkAnalyzer = "";

        [JsonProperty(PropertyName = "矢量网络分析仪配置")]
        public VectorNetworkAnalyzerConfig VectorNetworkAnalyzerConfig { get; set; }

        [JsonProperty(PropertyName = "选择的信号发生器")]
        public string SelectedSignalGenerator { get { return _SelectedSignalGenerator; } set { SetProperty(ref _SelectedSignalGenerator, value); } }
        [JsonIgnore]
        private string _SelectedSignalGenerator = "";

        [JsonProperty(PropertyName = "信号发生器配置")]
        public SignalGeneratorConfig SignalGeneratorConfig { get; set; }

        [JsonProperty(PropertyName = "调试模式")]
        public bool DebugMode { get; set; } = false;
    }
}
